package cn.itsource.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Data
public class ArticleType {
    private  Long id;
    private  String typeName;
    private  String status;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private  Date createTime = new Date();
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private  Date updateTime;
    private  Long parentId;
    //上级文章类型对象
    private ArticleType parent;
    //子级文章列表
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<ArticleType> children = new ArrayList<>();
}